luci-mod-network: don't implicitly move bridge opts into device sections
authorJo-Philipp Wich <[email protected]>
Mon, 29 Mar 2021 14:00:10 +0000 (16:00 +0200)
committerJo-Philipp Wich <[email protected]>
Mon, 29 Mar 2021 14:00:10 +0000 (16:00 +0200)
commita9a223b973c7f5f057d19a7fc09e7364087fec79
tree9f11166e3b1ee06a699e6843d4bd926fe3c5e55a
parent32f0ff25a2ef28b58eae62688ecdb9d23dc91df0
luci-mod-network: don't implicitly move bridge opts into device sections

When setting bridge and device specific options such 'stp' or
'igmp_snooping', LuCI so far transparently created or reused a
`config device` section and set the corresponding option there.

In the case of bridges, this triggers multiple problems:

 - When implicitely creating a `config device` section referring to the
   bridge device, the legacy bridge configuration of the corresponding
   interface is disabled, causing a broken configuration on subsequent
   save operations

 - Netifd does not appear to properly merge bridge settings from config
   device and config interface sections, leading to an incoherent
   configuration state

In order to avoid that issue, do not automatically migrate bridge specific
options.

Fixes: #4948
Signed-off-by: Jo-Philipp Wich <[email protected]>
modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js